<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Praca magisterska: Plik źródłowy C:/Users/boski/Documents/Visual Studio 2008/Projects/cuda/blms/filterBLMS_GPUstreams.h</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="logo_eti_small.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Praca magisterska
   
   </div>
   <div id="projectbrief">Implementacja algorytmów filtracji adaptacyjnej o strukturze transwersalnej na platformie CUDA</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Wygenerowano przez Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Szukaj');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Strona&#160;główna</span></a></li>
      <li><a href="annotated.html"><span>Klasy</span></a></li>
      <li class="current"><a href="files.html"><span>Pliki</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Szukaj" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Lista&#160;plików</span></a></li>
      <li><a href="globals.html"><span>Składowe&#160;plików</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('filter_b_l_m_s___g_p_ustreams_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">C:/Users/boski/Documents/Visual Studio 2008/Projects/cuda/blms/filterBLMS_GPUstreams.h</div>  </div>
</div>
<div class="contents">
<a href="filter_b_l_m_s___g_p_ustreams_8h.html">Idź do dokumentacji tego pliku.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00011"></a>00011 <span class="preprocessor">#ifndef FILTERBLMS_GPUSTREAMS_H</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span><span class="preprocessor">#define FILTERBLMS_GPUSTREAMS_H</span>
<a name="l00013"></a>00013 <span class="preprocessor"></span>
<a name="l00014"></a>00014 <span class="preprocessor">#include &quot;<a class="code" href="define_8h.html" title="Plik nagłówkowy ze zdefiniowanymi danymi.">define.h</a>&quot;</span>
<a name="l00015"></a>00015 <span class="preprocessor">#include &quot;<a class="code" href="cudacomplex_8h.html" title="Implementacja obsługi liczb zespolonych.">cudacomplex.h</a>&quot;</span>
<a name="l00016"></a>00016 <span class="preprocessor">#include &quot;<a class="code" href="signal_reader_writer_8h.html" title="Odczytywanie i zapisywanie sygnałów wejściowych i wyjściowych.">signalReaderWriter.h</a>&quot;</span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &quot;<a class="code" href="kernels_8h.html" title="Funkcje urządzenia (kernele) - wykonywane na GPU.">kernels.h</a>&quot;</span>
<a name="l00018"></a>00018 <span class="preprocessor">#include &quot;fftw3.h&quot;</span>
<a name="l00019"></a>00019 
<a name="l00026"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html">00026</a> <span class="keyword">struct </span><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html" title="Filtr BLMS - wersja GPU z wykorzystaniem strumieni CUDA, FFT na CPU (biblioteka FFTW).">filterBLMS_GPUstreams</a> {
<a name="l00027"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#afaa3eeef43c3a03926e6526a18a3e8eb">00027</a>         <span class="keywordtype">int</span> <a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#afaa3eeef43c3a03926e6526a18a3e8eb" title="długość filtru">M</a>; 
<a name="l00028"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a2078a6e047564cb909bef225fac63c4a">00028</a>         <span class="keywordtype">int</span> <a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a2078a6e047564cb909bef225fac63c4a" title="długość bloku danych">B</a>; 
<a name="l00029"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a0a7da9b4efa94ad2734a2d028cbdaea3">00029</a>         <span class="keywordtype">float</span> <a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a0a7da9b4efa94ad2734a2d028cbdaea3" title="parametr mi filtru">mi</a>; 
<a name="l00030"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a2e39a8c38f4da8f0cf654c314435a4f0">00030</a>         <span class="keywordtype">float</span> <a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a2e39a8c38f4da8f0cf654c314435a4f0" title="parametr beta filtru">beta</a>; 
<a name="l00031"></a>00031 
<a name="l00032"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a6ad19359a406e56e0499d7e85ab0aa31">00032</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a6ad19359a406e56e0499d7e85ab0aa31" title="sygnał wejściowy u (input)">u</a>; 
<a name="l00033"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#adff97d45acd6a9f0312359d3898a80eb">00033</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#adff97d45acd6a9f0312359d3898a80eb" title="sygnał wejściowy d (desired)">d</a>; 
<a name="l00034"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#aa618e0102962d65de9885d3d200f98bf">00034</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#aa618e0102962d65de9885d3d200f98bf" title="sygnał wyjściowy e (error)">e</a>; 
<a name="l00035"></a>00035 
<a name="l00036"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a6f6c80a83d00cb40ea14a05acd612642">00036</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a6f6c80a83d00cb40ea14a05acd612642" title="bufor zawierajacy dwa bloki sygnalu u">buf_u</a>; 
<a name="l00037"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#abc738056ebe61f82274f83611acfdf33">00037</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#abc738056ebe61f82274f83611acfdf33" title="blok/bufor (dlugosc 2B) sygnalu d">buf_d</a>; 
<a name="l00038"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#aca7a43581615b62fb84367d51c8c1f26">00038</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#aca7a43581615b62fb84367d51c8c1f26" title="blok/bufor (dlugosc 2B ze wzgledu na pozniejsze dzialanie ifft) sygnalu wyjsciowego y...">buf_y</a>; 
<a name="l00039"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#aee50c1768b7875be5c1906def01793e5">00039</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#aee50c1768b7875be5c1906def01793e5" title="blok/bufor (dlugosc 2B) sygnalu e">buf_e</a>; 
<a name="l00040"></a>00040 
<a name="l00041"></a>00041         <span class="comment">// alokacja U_sub na hoscie niepotrzebna, wystarczy tylko na urządzeniu</span>
<a name="l00042"></a>00042         
<a name="l00043"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a7c308ed3a023850b931185c45d5bed66">00043</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a7c308ed3a023850b931185c45d5bed66" title="wagi filtrów">lc</a>; 
<a name="l00044"></a>00044 
<a name="l00045"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a44783249e7f957e30709ea5b299e493d">00045</a>         <span class="keywordtype">float</span> *<a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a44783249e7f957e30709ea5b299e493d" title="parametry lambda">lambda</a>; 
<a name="l00046"></a>00046 
<a name="l00047"></a>00047         <span class="comment">// strumienie</span>
<a name="l00048"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a46e87830aece09ca87cd25f6cc0380bf">00048</a>         cudaStream_t <a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a46e87830aece09ca87cd25f6cc0380bf" title="strumień CUDA 1">stream0</a>; 
<a name="l00049"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#ad134b3e9b51a9082c45792e9bf0fd736">00049</a>         cudaStream_t <a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#ad134b3e9b51a9082c45792e9bf0fd736" title="strumień CUDA 1">stream1</a>; 
<a name="l00050"></a>00050 
<a name="l00051"></a>00051         <span class="comment">// wskaźniki na zmienne w pamięci urządzenia dla strumienia 0</span>
<a name="l00052"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a005845343eef8dbcba3749fa9cb795fb">00052</a>         <span class="keywordtype">float</span> *<a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a005845343eef8dbcba3749fa9cb795fb" title="DEVICE parametry lambda.">dev_lambda0</a>; 
<a name="l00053"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a90868616cabee9a82946dcfd946f5e33">00053</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a90868616cabee9a82946dcfd946f5e33" title="DEVICE bufor zawierajacy dwa bloki sygnalu u po dzialaniu FFT.">dev_U0</a>; 
<a name="l00054"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a54e5b2545df50bb019d9f4e29c082426">00054</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a54e5b2545df50bb019d9f4e29c082426" title="DEVICE bufory &#39;podsygnalow&#39; wejsciowych po FFT (2B wektorow o dlugosci M/B w postaci jednego wektora)...">dev_U_sub0</a>; 
<a name="l00055"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#ada906b4aea6bd8c0f7c791b8d5c13393">00055</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#ada906b4aea6bd8c0f7c791b8d5c13393" title="DEVICE probki &#39;podsygnalow&#39; wyjsciowych przed IFFT.">dev_Y0</a>; 
<a name="l00056"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#ae1a819c0dc373cfe1a7390a10f1f46c3">00056</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#ae1a819c0dc373cfe1a7390a10f1f46c3" title="DEVICE bufor zawierajacy dwa bloki sygnalu e po dzialaniu FFT.">dev_E0</a>; 
<a name="l00057"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a5e8784066fb9aff5990ae6b74d69e42c">00057</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a5e8784066fb9aff5990ae6b74d69e42c" title="DEVICE wagi filtrow.">dev_lc0</a>; 
<a name="l00058"></a>00058 
<a name="l00059"></a>00059         <span class="comment">// wskaźniki na zmienne w pamięci urządzenia dla strumienia 1</span>
<a name="l00060"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a95e6386e9d87d391c5f3a216a6d7eb5a">00060</a>         <span class="keywordtype">float</span> *<a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a95e6386e9d87d391c5f3a216a6d7eb5a" title="DEVICE parametry lambda.">dev_lambda1</a>; 
<a name="l00061"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#aef9bbc6e23c1149e2394a664ea7136b4">00061</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#aef9bbc6e23c1149e2394a664ea7136b4" title="DEVICE bufor zawierajacy dwa bloki sygnalu u po dzialaniu FFT.">dev_U1</a>; 
<a name="l00062"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a1b22bd8443d6e49045d50c34b6d2ed5c">00062</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a1b22bd8443d6e49045d50c34b6d2ed5c" title="DEVICE bufory &#39;podsygnalow&#39; wejsciowych po FFT (2B wektorow o dlugosci M/B w postaci jednego wektora)...">dev_U_sub1</a>; 
<a name="l00063"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a1137bd1af9723f6afe4099a402dd5ac5">00063</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a1137bd1af9723f6afe4099a402dd5ac5" title="DEVICE probki &#39;podsygnalow&#39; wyjsciowych przed IFFT.">dev_Y1</a>; 
<a name="l00064"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a6be171d15d0931caa8b4e59bf673fe39">00064</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a6be171d15d0931caa8b4e59bf673fe39" title="DEVICE bufor zawierajacy dwa bloki sygnalu e po dzialaniu FFT.">dev_E1</a>; 
<a name="l00065"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a68623ec4d945f3f06832fd6462ff1328">00065</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a68623ec4d945f3f06832fd6462ff1328" title="DEVICE wagi filtrow.">dev_lc1</a>; 
<a name="l00066"></a>00066         
<a name="l00067"></a>00067         <span class="comment">// wskaźniki na zmienne w pamięci hosta (wykorzystywane przy transformatach)</span>
<a name="l00068"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a73cdd0dd8899e8550203d9cfc5df0a28">00068</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a73cdd0dd8899e8550203d9cfc5df0a28" title="bufor zawierajacy dwa bloki sygnalu u po dzialaniu FFT">U</a>; 
<a name="l00069"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a89d3b4b14b4a861605f724b00c8249e1">00069</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a89d3b4b14b4a861605f724b00c8249e1" title="probki &#39;podsygnalow&#39; wyjsciowych przed IFFT">Y</a>; 
<a name="l00070"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a4430a2323feceb0552d1288ba2672e80">00070</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a4430a2323feceb0552d1288ba2672e80" title="bufor zawierajacy dwa bloki sygnalu e po dzialaniu FFT">E</a>; 
<a name="l00071"></a>00071         
<a name="l00072"></a>00072         <span class="comment">// plany FFT (FFTW)</span>
<a name="l00073"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a8659bce8d541b12538b9c320048b9a1f">00073</a>         fftwf_plan <a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a8659bce8d541b12538b9c320048b9a1f" title="plan FFT">fftwfPlan_U</a>; 
<a name="l00074"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#aa9be96617537ee2610c5950238914590">00074</a>         fftwf_plan <a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#aa9be96617537ee2610c5950238914590" title="plan IFFT">fftwfPlan_Y</a>; 
<a name="l00075"></a><a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a12bd5d192d72ea546e577f4432600472">00075</a>         fftwf_plan <a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a12bd5d192d72ea546e577f4432600472" title="plan FFT">fftwfPlan_E</a>; 
<a name="l00076"></a>00076 
<a name="l00088"></a>00088         <a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#ab3b064e9a744138abbe0fe083a403d12">filterBLMS_GPUstreams</a>(<span class="keywordtype">int</span> Nu, <span class="keywordtype">int</span> Msize, <span class="keywordtype">int</span> Bsize, <span class="keywordtype">float</span> miParam, <span class="keywordtype">float</span> betaParam, <a class="code" href="struct_signal_reader_writer.html" title="Odczytywanie i zapisywanie sygnałów wejściowych i wyjściowych.">SignalReaderWriter</a> SRW);
<a name="l00089"></a>00089 
<a name="l00093"></a>00093         <a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#aa52b56185237643370cb5ed13b2a0107">~filterBLMS_GPUstreams</a>();
<a name="l00094"></a>00094 
<a name="l00103"></a>00103         <span class="keywordtype">void</span> <a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a582e6d2516ef46ed84c8fe54d6c9ceba">dataFiltering</a>(<span class="keywordtype">int</span> blocksPerGrid, <span class="keywordtype">int</span> threadsPerBlock, <span class="keywordtype">int</span> Nu);
<a name="l00104"></a>00104 
<a name="l00110"></a>00110         <span class="keywordtype">void</span> <a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#ad5bbea03956c0b32925272559cac27c8">syncStreams</a>();
<a name="l00111"></a>00111 
<a name="l00117"></a>00117         <span class="keywordtype">void</span> <a class="code" href="structfilter_b_l_m_s___g_p_ustreams.html#a0fba760810f81f6ffab60b93029aa3d8">freeMemory</a>();
<a name="l00118"></a>00118 
<a name="l00119"></a>00119 };
<a name="l00120"></a>00120 
<a name="l00121"></a>00121 <span class="preprocessor">#endif </span><span class="comment">/* FILTERBLMS_GPUSTREAMS_H */</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="filter_b_l_m_s___g_p_ustreams_8h.html">filterBLMS_GPUstreams.h</a>      </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Klasy</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Pliki</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Funkcje</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Zmienne</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Definicje</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">Wygenerowano Wed Nov 23 2011 12:30:13 dla Praca magisterska programem
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
